This folder contains the code and data required to replicate the results of the paper 
"Spillover effects of reminder nudges in complex environments"
by Alexander K. Koch, Dan Mønster, and Julia Nafziger

The folders are structured as follows:

- Codes:
	The file DataAnalysis.do contains all codes to replicate the results of the paper.
	It uses the data sets \Input\Replicationdata.dta and \RawData\Attrition_data.dta.
	To run the code, simply change the path on line 25 to match the path on your computer.

	The file DataPreparation.do contains all codes to generate the data set \Input\Replicationdata.dta.
	It uses the data sets \RawData\Game_data.dta and \RawData\Survey_data.dta.
	To run the code, simply change the path on line 16 to match the path on your computer.

	Note that the codes were written in Stata version 18.
	There may be problems running the codes with earlier versions of Stata.

	The file figure_2_main_results.R contains the code to replicate Figure 2 of the paper.
	It uses the output from the Stata files described above.

	The file figure_S3-S5.R contains the code to replicate Figures S3, S4, and S5 in the Supporting Information.
	Is uses the data set Input/Replicationdata.csv.

	Note that the R scripts have been tested with R version 4.3.2 (2023-10-31).

- Input: 	This folder contains the data set Replicationdata.dta that stores all the data required to replicate the results.

- Output: 	As the code runs, all tables and figures are stored in this folder.

- RawData: 	This folder contains the raw data used to generate the data set \Input\Replicationdata.dta and for the analysis of attrition.
	
		Attrition_data.dta: This data set contains one row for each subject that completed part 1 of the study and is used by the code in \Codes\DataAnalysis.doto to replicate the results in Appendix SI 5.
		
		Game_data.dta: This data set contains the data from the game and is used by the code in \Codes\DataAnalysis.doto to replicate the results of the paper.
		
		Survey_data.dta: This data set contains the data from the surveys and Prolific background data and is used by the code in \Codes\DataAnalysis.doto to replicate the results of the paper

- Temp: As the code runs, this folder stores auxilliary files used to create the final outputs in the Output folder.

Variable descriptions are in the file Variables.xlsx.
	